import request from '@/router/axios';

// 补液工单
export const getPage = (page, params) => {
  return request({
    url: '/api/uic-system/fillstorageorder/page',
    method: 'get',
    params: {
      ...page,
      ...params,
    }
  })
}
// 添加
export const save = (form) => {
  return request({
    url: '/api/uic-system/fillstorageorder/save',
    method: 'post',
    data: {
      ...form,
    }
  })
}

// 取消工单
export const cancelOrder = (orderId) => {
  return request({
    url: `/api/uic-system/fillstorageorder/cancelOrder/${orderId}`,
    method: 'post'
  })
}

// 派遣
export const assignOrderCar = (orderId, carId) => {
  return request({
    url: `/api/uic-system/fillstorageorder/assignOrder/${orderId}/${carId}`,
    method: 'post'
  })
}

export const detailPage = (page, params) => {
  return request({
    url: `/api/uic-system/fillstorageorderdetail/page`,
    method: 'get',
    params: {
      ...page,
      ...params,
    }
  })
}
